table.insert(itemActions,
	function(item, action)
		-- GOLD
		local priority = 3 -- pick priority
		local mingold = 500 -- min gold value
		
		-- Note: mingold amounts under 500 can cause your bot to spend a lot of time picking gold piles
		-- For example, in Baa's chamber, the bot will detour from killing Baal to pick the goldpiles in the corner
		-- This behavior can eaily get you killed by monsters, so try to keep this above 500 and rely on selling items 
		-- as your primary form of income

		if item.baseItem.code ~= "gld" then 
			return false
		elseif action == aPICK and item.action ~= ItemActionType.DropToGround and
				item.stats[0].Value > mingold then
			return priority
		end

		return false
	end
)